home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / pcxkt3.zip / SHOW256.PAS < prev    next >
Pascal/Delphi Source File  |  1990-10-22  |  891b  |  29 lines

  1. program SHOW256;
  2.  
  3. (* Sample implementation of PCX.TPU for 320x200x256-color files. Enter
  4.    a filename (without extension) on the command line or, if running under
  5.    Turbo, in the Parameters box. *)
  6.  
  7. uses DOS, CRT, PCX;
  8.  
  9. var   blackpal: array[0..255] of RGBrec;
  10.  
  11. (* -------------------------- SHOW256 --------------------------------- *)
  12.  
  13. begin
  14. pcxfilename:= paramstr(1) + '.PCX';
  15. setmode($13);                            { Initialize graphics }
  16. fillchar(blackpal, 768, 0);              { Set all colors to black }
  17. setregisters(blackpal);
  18. read_pcx256(pcxfilename);                { Put image into display memory }
  19. if file_error then
  20. begin
  21.   setmode(3);
  22.   writeln('Can''t read that file.');
  23.   halt;
  24. end;
  25. setregisters(RGB256);                    { Show true colors }
  26. repeat until readkey <> #1;
  27. setmode(3);                              { Restore text mode }
  28. end.
  29.